<template>
  <div>
    <h1>vuex-base案例</h1>
    <Son1></Son1>
    <Son2></Son2>
    <button @click="changeName">changeName</button>
  </div>
</template>
<script>
import Son1 from "./Son1.vue"
import Son2 from "./Son2.vue"
export default {
  components: { Son1, Son2 },
  methods: {
    changeName() {
      // commit('mutations方法名', 自己带的参数)
      this.$store.commit("changeNameMutation",66)
    }
  }
}
</script>